import React from 'react';
import ReactDOM from 'react-dom';
import A from './component/A'
import B from './component/B'
class App extends React.Component {
  state = {
    count: 100,
    obj: { n: 100 }
  }
  render() {
    let { count, obj } = this.state;
    return <div className=''>
      <button onClick={() => {
        // this.state.obj.n++
        this.setState({ count: count + 1, obj: { n: obj.n + 1 } })
      }
      }>+</button>
      {obj.n}
      <A count={count} />
      <B obj={obj} />
    </div>;
  }
}

ReactDOM.render(<App />, document.getElementById('root'))